package handlers

import (
	"MBTIx/dba"
	"MBTIx/models"
	"net/http"

	"github.com/gin-gonic/gin"
	"github.com/jmoiron/sqlx"
)

func Get_department(c *gin.Context){
	db,_ := c.Get("db")

	var dep models.Department
	var deps []models.Department
	c.ShouldBind(&dep)
	dba.GetDepByColId(db.(*sqlx.DB),dep.Col_id,&deps)

	c.JSON(http.StatusOK,deps)

}